package com.example.whatrubbish.mapper;

import com.example.whatrubbish.model.Feedback;
import com.example.whatrubbish.vo.Criteria;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;

import java.util.List;

@Mapper
@Component("FeedbackMapper")
public interface FeedbackMapper {
    Long selectAllUnReadCount(Criteria criteria);
    List<Feedback> selectAllUnRead(Criteria criteria);

    Long selectAllReadCount(Criteria criteria);
    List<Feedback> selectAllRead(Criteria criteria);

    Long selectAllDeleteCount(Criteria criteria);
    List<Feedback> selectAllDelete(Criteria criteria);

    int updateReadById(Long feedbackId);
    int updateReadByList(List list);

    int deleteById(Long feedbackId);
    int deleteByList(List list);

    int deleteByPrimaryKey(Long feedbackId);
    int deleteByPrimaryKeyList(List list);

    int insert(Feedback record);

    int insertSelective(Feedback record);

    Feedback selectByPrimaryKey(Long feedbackId);

    int updateByPrimaryKeySelective(Feedback record);

    int updateByPrimaryKey(Feedback record);
}